﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IComment" here, you must also update the reference to "IComment" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IComment
    {
        [OperationContract]
        DataSet Comment_GetAll();

        [OperationContract]
        CommentInfo Comment_GetInfo(int CommentID);

        [OperationContract]
        DataSet Comment_GetList( out int ItemCount,int currentPage, int pageSize);

        [OperationContract]
        DataSet Comment_GetWithEmployee(int EmployeeID);

        [OperationContract]
        int Comment_Insert(CommentInfo eInfo);

        [OperationContract]
        bool Comment_Update(CommentInfo eInfo);

        [OperationContract]
        bool Comment_UpdateEmployee(int EmployeeID);

        [OperationContract]
        bool Comment_Delete(int CommentID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class CommentInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _Kind;
        [DataMember]
        public string Kind
        {
            get { return _Kind; }
            set { _Kind = value; }
        }

        string _Discipline;
        [DataMember]
        public string Discipline
        {
            get { return _Discipline; }
            set { _Discipline = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        string _Morality;
        [DataMember]
        public string Morality
        {
            get { return _Morality; }
            set { _Morality = value; }
        }

        string _Speciality;
        [DataMember]
        public string Speciality
        {
            get { return _Speciality; }
            set { _Speciality = value; }
        }

        string _Request;
        [DataMember]
        public string Request
        {
            get { return _Request; }
            set { _Request = value; }
        }

        bool _Accept;
        [DataMember]
        public bool Accept
        {
            get { return _Accept; }
            set { _Accept = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }
}

